package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.PersonRole;
import com.zhijian.medical.entity.vo.request.PersonRoleSearchVo;
import com.zhijian.medical.entity.vo.response.PersonRoleVo;

import java.util.List;

public interface PersonRoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(PersonRole record);

    int insertSelective(PersonRole record);

    PersonRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PersonRole record);

    int updateByPrimaryKey(PersonRole record);

    int count(PersonRoleSearchVo personRoleSearchVo);

    List<PersonRoleVo> selectList(PersonRoleSearchVo personRoleSearchVo);

    PersonRoleVo selectVoById(Long id);

    /**
     * 根据人员id查询所有的角色id
     *
     * @param personId
     * @return
     */
    List<Long> selectRolesByPersonId(Long personId);

    /**
     * 根据人员id删除
     *
     * @param personId
     */
    void deleteByPersonId(Long personId);
}